const mongoose = require('mongoose');
const Schema = mongoose.Schema;
mongoose.connect('mongodb://localhost:27017/user', { useNewUrlParser: true, useUnifiedTopology: true });
let cardSchema = new Schema({
    yourName: {
        type: String,
        required: true
    },
    anotherName: {
        type: String,
        required: true
    },   
    yourSex: {
        type: String,
        required: true
    },
    anotherSex: {
        type: String,
        required: true
    },
    place: {
        type: String,
        required:true
    },
    trueTime: {
        type: String,
        required: true
    },
    info: {
        type: String,
        required: true
    },
    color: {
        type: String,
        required: true
    },
    praises: {
        type: String,
        required: true
    },
    comments: {
        type: String,
        required: true
    },
    commentList: {
        type: Array,
        required: true,
    }
})
module.exports = mongoose.model('Card', cardSchema);